/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sv.edu.ufg.mir.Calcula.Area;

/**
 *
 * @author javaee
 */
public class Cuadratica {
    public static double x1;
    public static double x2;
    double a;
    double b;
    double c;
    static{
        x1=0;
        x2=0;
    }
    public Cuadratica() {
        this.a=1;
        this.b=1;
        this.c=1;
    }

    public Cuadratica(double a, double b, double c) {
        this.a = a;
        this.b = b;
        this.c = c;
    }

    public double getA() {
        return a;
    }

    public void setA(double a) {
        this.a = a;
    }

    public double getB() {
        return b;
    }

    public void setB(double b) {
        this.b = b;
    }

    public double getC() {
        return c;
    }

    public void setC(double c) {
        this.c = c;
    }

    @Override
    public String toString() {
        return "Cuadratica{" + "a=" + a + ", b=" + b + ", c=" + c + '}';
    }
    
    public void Calcular(){
        x1=(-b+(b*b-4*a*c))/(2*a);
        x2=(-b-(b*b-4*a*c))/(2*a);
    }
    
    
}
